Skip to content

feat: 增加 BOSS 猎头岗位过滤 - #30

Merged
NingNing0111 merged 1 commit into
OpenFuckJob:masterfrom
kinghy949:dev-why-20260821-headhunter-filter
Aug 21, 2026
Merged

feat: 增加 BOSS 猎头岗位过滤#30
NingNing0111 merged 1 commit into
OpenFuckJob:masterfrom
kinghy949:dev-why-20260821-headhunter-filter

Conversation

@kinghy949

Copy link
Copy Markdown
Contributor

修改内容

  • 新增 BOSS 猎头岗位过滤配置,默认关闭
  • 配置中心新增 BOSS 猎头岗位过滤 开关,位置在 配置中心 -> 求职方案 -> 岗位筛选
  • 开启后,在点击岗位卡片前检测当前卡片内的猎头标识:img.job-tag-icon[alt=猎头]
  • 命中猎头岗位时直接跳过,不打开详情、不进入活跃度判断、规则过滤、AI 复核或打招呼流程
  • 运行日志增加单条提示:检测到猎头岗位,已按配置跳过
  • 任务汇总增加 猎头岗位跳过 N 条 统计
  • 补充配置默认值和测试夹具,避免旧配置缺字段时报错

技术说明

  • 识别范围限定在当前岗位卡片内,通过 rust_drission 的 Element 子查询读取 .job-tag-iconalt 属性
  • 只精确匹配 alt=猎头,避免误判其他岗位标签
  • 过滤发生在点击卡片之前,减少对猎头岗位详情页的访问

验证

  • cargo test --no-default-features boss::handler::position_say_hello --lib 通过,40 个测试全过
  • ./node_modules/.bin/tsc --noEmit 通过
  • 已本地重新编译并启动桌面应用验证

@NingNing0111

Copy link
Copy Markdown
Contributor

@codex reveiw

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b79049360

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +593 to +595
if boss_filter_config.exclude_headhunter_jobs && is_headhunter_job_card(&job_card_ele)? {
return Ok(CardOutcome::Skipped(SkipReason::Headhunter));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Deduplicate headhunter skips across rescans

When loading another batch, the outer loop rescans every card still on the page, but this return neither marks the card as seen nor records its job ID in a task-local filtered set. Because the filter runs before the click that would add is-seen, each headhunter card is counted and logged again after every scroll, so skipped_headhunter can greatly overstate the number of jobs and produce repeated per-card log messages. Track excluded job IDs (or otherwise mark the card as handled) before returning this outcome.

Useful? React with 👍 / 👎.

@NingNing0111
NingNing0111 merged commit a963c9c into OpenFuckJob:master Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants